package com._54programer.sourcecode.pro;

import org.springframework.boot.CommandLineRunner;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

@Component
public class PropertiesCommandLineRunner implements CommandLineRunner, EnvironmentAware {

    private Environment environment;

    @Override
    public void run(String... args) throws Exception {
        //System.out.println("name: "+environment.getProperty("name"));
    }

    @Override
    public void setEnvironment(Environment environment) {
        this.environment = environment;
    }
}
